﻿using System.Windows;
using Microsoft.Phone.Controls;

namespace JSON.App.Accelerator
{
    public partial class MainPage : PhoneApplicationPage
    {
        private readonly JsonViewModel1 _jsonViewModel = new JsonViewModel1();

        // Constructor
        public MainPage()
        {
            InitializeComponent();

            DataContext = _jsonViewModel;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            _jsonViewModel.GetData();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            _jsonViewModel.Results[0].Title = "Hello, World!";
        }
    }
}